import {getClient} from '../utils/util'
import {getPath} from './util'

let client = getClient;

const RouterExam = [
  {
    path: '/exam/apply/:examId/:hsId',
    name: '/exam/apply',
    component: resolve => require([`@/pages/exam/sign/index-${client()}`], resolve),
    meta: {
      requireAuth: false,
      hideHeader: true,
    }
  },
  {
    path: getPath('/exam/normal/:examId/:subjectId/:type'),
    name: '/exam/normal',
    component: resolve => require([`@/pages/exam/exam/normal/index-${client()}`], resolve),
  },
  {
    path: '/exam/overall/:examId/:subjectId/:hsId',
    name: '/exam/overall',
    component: resolve => require([`@/pages/exam/exam/normal/index-${client()}`], resolve),
  },
  {
    path: getPath('/exam/error/:examId/:subjectId'),
    name: '/exam/error',
    component: resolve => require([`@/pages/exam/exam/error/index-${client()}`], resolve),
    meta: {
      title:'错题库',
    }
  },
  {
    path: getPath('/exam/analyze/:examResultId'),
    name: '/exam/analyze',
    component: resolve => require([`@/pages/exam/exam/analyze/index-${client()}`], resolve),
    meta: {
      title:'考试分析',
    }
  },
  {
    path: getPath('/exam/result/general/:subjectId/:examId/:examResultId/:type'),
    name: '/exam/result/general',
    component: resolve => require([`@/pages/exam/result/general/index`], resolve),
    meta: {
      title:'考试结果',
      requireAuth: false
    }
  },
  {
    path: getPath('/exam/result/practice/:subjectId/:examId/:examResultId/:errorType'),
    name: '/exam/result/practice',
    component: resolve => require([`@/pages/exam/result/practice/index`], resolve),
    meta: {
      title:'练习结果',
      requireAuth: false
    }
  },
];

export default RouterExam
